package com.calvin.lingting;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import com.calvin.lib.CActivity;

import java.util.Timer;
import java.util.TimerTask;

public class SplashActivity extends CActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ImageView imageView = new ImageView(this);
        imageView.setScaleType(ImageView.ScaleType.FIT_XY);
        imageView.setImageResource(R.drawable.zone_background);
        setContentView(imageView);
        new Timer().schedule(new TimerTask() {
            @Override
            public void run() {
                Intent intent = new Intent(SplashActivity.this,MainActivity.class);
                SplashActivity.this.startActivity(intent);
//                SplashActivity.this.overridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);
                SplashActivity.this.finish();
            }
        }, 2000);
    }
}
